
angular.module("crawlerApp").controller("crawlerTaskCtrl",function($scope,$http){
    $scope.startTask = function(status){
        startTask(status)
    };
    $scope.download = function(){
        window.location.href="doc/download"
    };
    function startTask(status){
        $http.get("crawler/task/start/"+status).then(function(response){
            alert(response.data);
        })
    }
    getTime();
    function getTime(){
        $http.get("crawler/task/time").then(function(response){
            $scope.lastTime=response.data;
        })
    }
    $scope.parse = function(){
        $http.get("crawler/task/parse").then(function(response){
            alert("开始解析")
        })
    }

});